package smartcrud.spring.models.cms;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import smartcrud.common.orm.Page;
import smartcrud.common.orm.PropertyFilter;

@Service
public class CommentServiceJdbcImpl implements CommentService {
	@Autowired
	private CommentDao commentDao;

	@Override
	public Comment createComment(Comment o) {
		return commentDao.createComment(o);
	}

	@Override
	public void deleteComment(Long id) {
		commentDao.deleteComment(id);
	}

	@Override
	public void updateComment(Comment o) {
		commentDao.updateComment(o);
	}

	@Override
	public Comment findCommentById(Long id) {
		return commentDao.findCommentById(id);
	}

	@Override
	public List<Comment> findAllComments() {
		return commentDao.findAllComments();
	}
	
    @Override
    public int count() {
        return commentDao.count();
    }	

	@Override
	public Page<Comment> findByPage(Page<Comment> page, final List<PropertyFilter> filters) {
		return commentDao.findByPage(page,filters);
	}
}
